<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="common-header(title, link)">
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?fdef99b7e60238d3867e7447dac83249";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    <meta content="4akdphFH3V" name="baidu-site-verification"/>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="/img/favicon.ico">

    <title th:replace="${title}">demo-project</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/ie10-viewport-bug-workaround.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/css/header.css}">
    <th:block th:replace="${link}"/>
    <link rel="stylesheet" th:href="@{/css/common.css}">
</head>
<body>
<!-- 类似指定id为header，复用方法：<div th:replace="commons/header :: header"></div>-->
<nav class="navbar navbar-fixed-top navbar-inverse nav_color" th:fragment="header">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" th:href="@{/}" th:text="${conf.webName}">Subject Show</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a th:href="@{/}" th:text="${conf.headSubject}">主页</a></li>
                <li><a th:href="@{'/majors/1'(page=1, size=8)}" th:text="${conf.headMajor}">专业</a></li>
                <li><a th:href="@{/top}" th:text="${conf.headTop}">视频贡献排行榜</a></li>
                <li><a th:href="@{/about}" th:text="${conf.headAbout}">关于我</a></li>
                <li><a th:href="@{/contact}" th:text="${conf.headContact}">联系我</a></li>
                <li><a th:href="@{/contribute}" th:text="${conf.headContribute}">我要投稿</a></li>
                <!--                <li><a th:href="@{/login}">登录/注册</a></li>-->
            </ul>
        </div>
    </div>
</nav>
</body>
</html>